//
//  FCTYService.h
//  FCBaseKit
//
//  Created by mac on 2021/1/14.
//  Copyright © 2021 Summer. All rights reserved.
//  FCHWOBSService

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "FCTYunOssConfigModel.h"
#import <FCBaseKit/FCSRUploadModel.h>
#import <FCBaseKit/FCSRCommonTools.h>

NS_ASSUME_NONNULL_BEGIN
typedef void(^FCTYRequestFailureBlock)(NSString *error, id data);

@interface FCTYService : NSObject


+ (instancetype)shareInstance;


/// 天翼云上传多图片
/// @param uploadImageDatas 图片NSArrayData
/// @param progressBlock 进度
/// @param success 成功
/// @param failure 失败
- (void)fc_tyyOosUploadFileWithImageDatas:(NSArray<NSData *> *)uploadImageDatas
                            progressBlock:(void (^_Nullable)(CGFloat prorgess))progressBlock
                     success:(void (^_Nullable)(NSArray* objectKeys))success
                                  failure:(void (^_Nullable)(NSError* error))failure;

/// 天翼云上传
/// @param data 图片或者视频data
/// @param index 图片位置
/// @param progressBlock 进度
/// @param type 1 png 图片 默认视频
/// @param success 成功回调
/// @param failed 视频回调
- (void)fc_tyyOosUploadFileWithData:(id)data
                           index:(NSInteger)index
                            type:(NSInteger)type
                         progressBlock:(void (^_Nullable)(CGFloat prorgess))progressBlock
                         success:(void(^)(NSInteger index, NSString * _Nullable imageUrl))success
                             failed:(FCTYRequestFailureBlock)failed;

/// 上传图片
- (void)fc_tyyOosUploadIMGWithData:(NSData *)uploadData
                          progressBlock:(void (^_Nullable)(CGFloat prorgess))progressBlock
                           success:(void (^_Nullable)(NSString* objectKey))success
                           failure:(void (^_Nullable)(NSError* error))failure;
/// 上传视频
- (void)fc_tyyOosUploadVideoWithData:(NSData *)uploadData
                          progressBlock:(void (^_Nullable)(CGFloat prorgess))progressBlock
                           success:(void (^_Nullable)(NSString* objectKey))success
                           failure:(void (^_Nullable)(NSError* error))failure;
 
#pragma mark - 通过数组里面放FCSRUploadModel模型,上传多张图片和视频

- (void)fc_tyyOosUploadModelArray:(NSArray<FCSRUploadModel *> *)modelArray
  progressBlock:(void (^_Nullable)(CGFloat progress))progressBlock
   success:(void (^_Nullable)(NSArray *paths))success
                                failure:(void (^_Nullable)(NSError* error))failure;

@end

 

NS_ASSUME_NONNULL_END
